﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Web;
using System.Drawing;
using System.Drawing.Imaging;

namespace TRPOP.Common
{
    /// <summary>
    /// ImageInfo
    /// </summary>
    public class ImageInfo
    {
        #region 私有变量

        private int m_intWidth = 0;
        private int m_intHeight = 0;
        private string m_strSaveExtendName = "";
        private bool m_blnIsAbsoluteResize = true;

        #endregion

        #region 构造函数

        /// <summary>
        /// 
        /// </summary>
        public ImageInfo()
        {
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="width"></param>
        /// <param name="height"></param>
        public ImageInfo(int width, int height)
        {
            this.m_intWidth = width;
            this.m_intHeight = height;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="width"></param>
        /// <param name="height"></param>
        /// <param name="saveExtendName"></param>
        public ImageInfo(int width, int height, string saveExtendName)
        {
            this.m_intWidth = width;
            this.m_intHeight = height;
            this.m_strSaveExtendName = saveExtendName;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="width"></param>
        /// <param name="height"></param>
        /// <param name="saveExtendName"></param>
        /// <param name="isAbsoluteResize"></param>
        public ImageInfo(int width, int height, string saveExtendName, bool isAbsoluteResize)
        {
            this.m_intWidth = width;
            this.m_intHeight = height;
            this.m_strSaveExtendName = saveExtendName;
            this.m_blnIsAbsoluteResize = isAbsoluteResize;
        }

        #endregion

        /// <summary>
        /// 图片宽度
        /// </summary>
        public int Width
        {
            get { return m_intWidth; }
            set { m_intWidth = value; }
        }
        /// <summary>
        /// 图片高度
        /// </summary>
        public int Height
        {
            get { return m_intHeight; }
            set { m_intHeight = value; }
        }
        /// <summary>
        /// 保存后的附加名称
        /// </summary>
        public string SaveExtendName
        {
            get { return m_strSaveExtendName; }
            set { m_strSaveExtendName = value; }
        }

        /// <summary>
        /// IsAbsoluteResize(绝对缩放，用白色弥补空白位置)
        /// </summary>
        public bool IsAbsoluteResize
        {
            get { return m_blnIsAbsoluteResize; }
            set { m_blnIsAbsoluteResize = value; }
        }
    }
}
